package testplan.entities;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;


@PersistenceCapable
public class TestPlan {
	
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long key;
	@Persistent
	private String name;
	// forgeign key to release
	@Persistent
	private Long release;
	@Persistent
	private String description;
	// foreign key to User
	@Persistent
	private Long createdBy;
	// foreign key to User
	@Persistent
	private Long updatedBy;
	@Persistent
	private Date createdAt;
	@Persistent
	private Date updatedAt;
	// foreign key to Project
	@Persistent
	private Long project;
	
	public TestPlan(String name, long release, String description, long createdBy, Date createdAt, long project) {
		super();
		this.name = name;
		this.release = release;
		this.description = description;
		this.createdBy = createdBy;
		this.createdAt = createdAt;
		this.project = project;
	}

    public TestPlan(String name, long release, String description, long createdBy, long projectId)
    {
        this(name, release, description, createdBy, new Date(), projectId);
    }


	public Long getProject() {
		return project;
	}

	public void setProject(Long project) {
		this.project = project;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getRelease() {
		return release;
	}

	public void setRelease(Long release) {
		this.release = release;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Long getCreatedBy() {
		return createdBy;
	}

	public void setCreatedBy(Long createdBy) {
		this.createdBy = createdBy;
	}

	public Long getUpdatedBy() {
		return updatedBy;
	}

	public void setUpdatedBy(Long updatedBy) {
		this.updatedBy = updatedBy;
	}

	public Date getCreatedAt() {
		return createdAt;
	}

	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}

	public Date getUpdatedAt() {
		return updatedAt;
	}

	public void setUpdatedAt(Date updatedAt) {
		this.updatedAt = updatedAt;
	}

	public long getKey()
    {
		return key;
	}

    public void setKey(long key)
    {
        this.key = key;
    }

}
